﻿' Models/FileInfo.vb
Namespace Models
    Public Class FileItem
        Public Property Path As String
        Public Property Name As String
        Public Property Size As Long
        Public Property Modified As Date
        Public Property Extension As String
        Public Property Content As String
        Public Property Keywords As List(Of String)

        Public Sub New()
            Keywords = New List(Of String)()
        End Sub
    End Class

    Public Class SearchResult
        Public Property File As FileItem
        Public Property Score As Double
        Public Property MatchedLines As List(Of String)
        Public Property IsOcrResult As Boolean = False

        Public Sub New()
            MatchedLines = New List(Of String)()
        End Sub
    End Class

    ' 应该在类外部或命名空间内定义这个类
    Public Class SearchResults
        Public Property Query As String
        Public Property Results As List(Of SearchResult)

        Public Sub New(query As String, results As List(Of SearchResult))
            Me.Query = query
            Me.Results = results
        End Sub
    End Class

    Public Class IndexingProgressInfo
        Public Property PercentComplete As Integer
        Public Property ProcessedFiles As Integer
        Public Property TotalFiles As Integer
        Public Property CurrentFileName As String

        Public Sub New(percentComplete As Integer, processedFiles As Integer, totalFiles As Integer, currentFileName As String)
            Me.PercentComplete = percentComplete
            Me.ProcessedFiles = processedFiles
            Me.TotalFiles = totalFiles
            Me.CurrentFileName = currentFileName
        End Sub
    End Class
End Namespace
